<template>
	<view class="content">
		<!-- <image style="width: 200px; height: 200px; background-color: #eeeeee;" :mode="item.mode" :src="src" @error="imageError"></image> -->
		<view style="width: 100%;">
			<view class="middle" style="background-color: #007AFF;">
				<swiper class="swiper" indicator-dots="false" autoplay="true" interval="3000" duration="500">
					<swiper-item v-for="(item, index) of bannerLists" :key="index">
						<view class="swiper-item">
							<image :src="item" mode="aspectFill" style="width: 100%;height: 100%;"></image>
						</view>
					</swiper-item>
				</swiper>
			</view>
		</view>
		

		<view class="action_box">
			<view class="title_box">
				<text>学生请假</text>
			</view>
			<view class="action_detail_box">
				<view style="flex: 6;" @click="qingjia(id)">
					<!-- <text class="zhengwen1">我要请假</text> -->
					<button class="common-btn">我要请假</button>
				</view>
				<view class="" style=" flex: 1;">
				</view>
				<view style="flex: 6;" @click="query()">
					<!-- <text class="zhengwen1">查询结果</text> -->
					<button class="common-btn">查询结果</button>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '00001',
				bannerLists: [
					'/static/banner1.jpg',
					'/static/banner2.jpg',
					'/static/banner3.jpg',
				]
			}
		},
		onLoad() {

		},
		methods: {
			qingjia(id){
				uni.navigateTo({
					url: '/pages/qingjiashenqig/qingjiashenqig?id='+ id
				});
			},
			query(){
				console.log('跳转');
				// uni.switchTab({
				// 	url: '/pages/components/xiaojiajilu',
				// });
				
				uni.switchTab({
					url: '/pages/TabBar/inquire/inquire',
					
				});
			}
		}
	}
</script>

<style>
	@import url(@/common/common.css);
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}


	.middle {
		height: 500rpx;
	}

	.swiper {
		height: 100%;
	}

	.swiper-item {
		height: 100%;
	}

	.action_box {
		/* padding: 30rpx; */
		padding-top: 30rpx;
		width: 100%;
		height: auto;
	}

	.title_box {
		width: 100%;
		height: 40rpx;
		line-height: 40rpx;
		border-left: 10rpx solid #77312A;
		color: #77312A;
		margin: 40rpx 30rpx 60rpx 30rpx;
		padding-left: 20rpx;
		font-size: 40rpx;
		font-weight: 500;
	}


	.action_detail_box {
		padding: 0rpx 30rpx 0 30rpx;
		display: flex;
		justify-content: space-around;
		height: 120rpx;
	}

	/* .text2 {
		text-align: center;
		flex: 7;
		height: 100%;
		border: #DCDCDC 1rpx solid;
		border-radius: 5rpx;
		color: #707070;
		font-family: , sans-serif;
		
	}

	.text2>text {
		line-height: 120rpx;
		color: #707070;
	} */
</style>
